// export { apiBanner } from './banner'
import { request } from '@/utils/request'
import type { HttpMethod } from '@/types/global'
export const apiBanner = (params: any, method: HttpMethod = 'GET') => {
    return request('/banners', params, method)
}

export const apiUser = (params: any, method: HttpMethod = 'GET') => {
    return request('/users', params, method)
}
//分类api请求
export const apiCategory = (params: any, method: HttpMethod = 'GET') => {
    return request('/categories', params, method)
}

//管理账号api请求
export const apiAdmin = (params: any, method: HttpMethod = 'GET') => {
    return request('/admins', params, method)
}
export const getAdminOptions = (params: any) => {
    return request('/admins/options', params, 'GET')
}

//菜单api请求
export const apiMenu = (params: any, method: HttpMethod = 'GET') => {
    return request('/menus', params, method)
}
//角色api请求
export const apiRole = (params: any, method: HttpMethod = 'GET') => {
    return request('/roles', params, method)
}
export const getRoleOptions = (params: any) => {
    return request('/roles/options', params, 'GET')
}

//获取角色所拥有的菜单id权限
export const getRoleMenuId = (params: any) => {
    return request('/roleMenuId/' + params.id, params, 'GET')
}
